package xyz.flowlight.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import xyz.flowlight.domain.entity.Cart;
import xyz.flowlight.domain.response.ResponseResult;
import xyz.flowlight.domain.vo.CartPageVO;
import xyz.flowlight.domain.vo.CartVO;

import java.math.BigDecimal;
import java.util.List;

@Service
public interface CartService extends IService<Cart> {
    ResponseResult<Void> addToCart(Integer userId, Integer productId, Integer quantity);

    ResponseResult<List<Cart>> getCartItems(Integer userId);

    BigDecimal calculateTotal(Integer userId);

    ResponseResult<CartPageVO> getCartList(Integer userId);

    void updateQuantity(Long cartId, Integer quantity);
}
